<template>
    <div class="mainNav">
            <!-- 管理员 -->
            <div>
                <el-menu class="el-menu-demo paddLR20" mode="horizontal" text-color="#000" active-text-color="#ef8200"  :key = 2>
                    <!-- 管理员 -->
                    <el-submenu index="20">
                        <template slot="title">
                            后台管理
                        </template>
                        <el-submenu index="20-1">
                                <template slot="title">人力资源</template>
                                <el-submenu index="20-1-1">
                                    <template slot="title">用户基本信息</template>
                                    <el-menu-item index="20-1-1-1">
                                        <router-link to="/admin/users/list" class="subMenuItemColor">所有用户</router-link>
                                    </el-menu-item>
                                </el-submenu>
                        </el-submenu>  
                        <el-menu-item index="20-2"><router-link to="/admin/structures/list" class="subMenuItemColor">部门管理</router-link></el-menu-item>
                        <el-menu-item index="20-3"><router-link to="/admin/position/list" class="subMenuItemColor">职位管理</router-link></el-menu-item>
                        <el-menu-item index="20-4"><router-link to="/admin/notice/list" class="subMenuItemColor">公告管理</router-link></el-menu-item>
                    </el-submenu>
                </el-menu>
            </div>
            
            <div class="line"></div>
    </div>  
</template>

<script>
import { mapGetters } from 'vuex'

export default {
    data(){
        return{
            activeIndex : '1',
        }
    },
    created() {
       
    },
     computed: {
        ...mapGetters([                                                                         //  用户权限
                'getIsAdmin'
        ])
    },
    methods: {
        handleSelect(key, keyPath) {
            let routerPath = ''
            switch(key){
                case '1':
                    routerPath = '/guest/welcome'
                    break
                case '2':
                    routerPath = '/guest/guestResumeReadOnly'
                    break
                case '4':
                    routerPath = '/guest/pay'
                    break
                case '8':
                    routerPath = '/guest/noticeList'
                break
                            // case 3:
                //     routerPath = '/admin/welcome'
                //     break
                // case 5:
                //     routerPath = '/admin/welcome'
                //     break
                // case 6:
                //     routerPath = '/admin/welcome'
                //     break
                // case 7:
                //     routerPath = '/admin/welcome'
                //     break
            }
            this.$router.push(routerPath)
        }
    },
}
</script>

<style scoped>
/* 线 */
.line{
    height: 2px;
    background-color:#ef8200;
}


</style>


